{% extends 'baykeshop/user/login.html' %}

{% load i18n %}

{% block title %}注册{% endblock %}


{% block login_title %}注册{% endblock %}

{% block form %}
    <form action="" method="post">
        {% csrf_token %}
        <div class="field">
            <p class="control has-icons-left has-icons-right">
                {{ form.username }}
              <span class="icon is-small is-left">
                <i class="mdi mdi-account"></i>
              </span>
              <span class="icon is-small is-right">
                <i class="mdi mdi-check"></i>
              </span>
            </p>
            
            {% if form.username.errors %}
            <div class="help is-danger">{{ form.username.errors }} </div>
            {% else %}
            <div class="help">{{ form.username.help_text }}</div>
            {% endif %}
                
          </div>
          <div class="field">
            <p class="control has-icons-left">
                {{ form.password1 }}
              <span class="icon is-small is-left">
                <i class="mdi mdi-lock"></i>
              </span>
            </p>
            {% if form.password1.errors %}
            <div class="help is-danger">{{ form.password1.errors }} </div>
            {% else %}
            <div class="help">{{ form.password1.help_text }}</div>
            {% endif %}
          </div>
          <div class="field">
            <p class="control has-icons-left">
                {{ form.password2 }}
              <span class="icon is-small is-left">
                <i class="mdi mdi-lock"></i>
              </span>
            </p>
            {% if form.password2.errors %}
            <div class="help is-danger">{{ form.password2.errors }} </div>
            {% else %}
            <div class="help">{{ form.password2.help_text }}</div>
            {% endif %}
          </div>
          <div class="field">
            <p class="control">
                <input type="submit" value="注册" class=" button is-primary is-fullwidth">
            </p>
          </div>
    </form>
{% endblock %}